package com.qfedu.edu.exception;

import com.qfedu.edu.result.ResponseCode;
import lombok.Data;
//业务异常
@Data
public class BusinessException extends RuntimeException {
    private Integer code;
    private String message;
   public BusinessException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public BusinessException(ResponseCode responseCode) {
        this.code = responseCode.getCode();
        this.message = responseCode.getMessage();
    }
}
